#!/usr/bin/gnuplot -persist

set term svg
set output 'plot_times.svg'

# si no se entiende nada, el plot_counts esta comentado!

set title "Tiempos de ejecucion del algoritmo 'amigos'"
set xlabel "n"
set ylabel "tiempo de ejecucion (s)"
set key left box
set bars small
set style line 1 lt 1 pt 1 ps 1
set style line 2 lt -1 pt 7 ps .3
plot 'time_err.dat' index 1 w yerr title "Primos" linestyle 1,\
     'time_err.dat' index 0 w yerr title "No-primos" linestyle 2,\
     sqrt(x)*log(x)/400000000 title "sqrt(x)*log(x)*c"

set term pop
set output
replot
